package com.mycirno.controller;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.mycirno.dto.SearchResult;
import com.mycirno.service.DMZJService;

@Controller
public class DMZJCotroller {
	
	private Logger logger = Logger.getLogger(getClass());
	
	@Autowired
	private DMZJService dmzjService;
	
	@RequestMapping(value="/searchDMZJ", method=RequestMethod.GET, produces={"application/json;charset=utf-8"})
	@ResponseBody
	public List<SearchResult> getSearchResult (String keyword, int page) {
		List<SearchResult> result = dmzjService.getSearchResult(keyword, page);
		return result;
	}
}
